package com.grp6.game.controller;

import java.util.List;

import com.grp6.game.model.IGameBoard;
import com.grp6.game.model.IGameModel;
import com.grp6.game.player.IComputerPlayer;
import com.grp6.game.player.IHumanPlayer;
import com.grp6.game.player.IPlayer;
import com.grp6.game.settings.IPreferences;
import com.grp6.game.ui.platform.IAbstractUIPlatformFactory;

/** 
 * This interface must be implemented by the game developer 
 * to create and initialize the context of the game
 * @author Group6
 */
public interface IAbstractGameFactory {
	
	//TODO fix javadocs in this class
	
	/**
	 * Creates the lifecycle of the game
	 * @return AbstractGameLifecycle object
	 */
	IGameLifecycle createLifecycle(IGameModel model);
	
	/**
	 * Creates the game preferences entered by the game player 
	 * @return IPreferences object
	 */
	IPreferences createPreferences(IAbstractUIPlatformFactory uifac);
	
	/**
	 * Creates the GameModel which provides the game developer with
	 * the player and the GameBoard objects
	 * @return IGameModel object
	 */
	<P extends IPlayer> IGameModel createGameModel(IGameBoard board,List<P> players);
	
	
	IHumanPlayer createHumanPlayer();
	IComputerPlayer createComputerPlayer();
	
	IGameBoard createGameBoard(IPreferences preferences);
	
	/**
	 * Creates the game builder which binds the GameBoard and the players
	 * @param IAbstractUIPlatformFactory object
	 * @return IGameBuilder object
	 */
	IGameBuilder createGameBuilder(IAbstractUIPlatformFactory uifac);
}
